package com.week1.day02;

import java.util.Scanner;

public class Demo04 {
    public static void main(String[] args) {
        System.out.println("请输入商品价格");
        Scanner sc = new Scanner(System.in);
        double price = sc.nextDouble();
        System.out.println("请输入你的积分");
        int x = sc.nextInt();
        if (x < 2000) {
            System.out.println("9折,实付"+price*0.9);
        } else if (x < 4000) {
            System.out.println("8折,实付"+price*0.8);
        } else if (x < 8000) {
            System.out.println("7折,实付"+price*x*0.7);
        } else if (x >= 8000) {
            System.out.println("6折,实付"+price*x*0.6);
        } else {
            System.out.println("输入有误");
        }
    }
}
